Optimal. Leaf size=22 \[ -\frac {\tanh ^{-1}(\cos (x))}{2 a}-\frac {\cot (x) \csc (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3254, 3853,
3855} \begin {gather*} -\frac {\tanh ^{-1}(\cos (x))}{2 a}-\frac {\cot (x) \csc (x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3254
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\csc (x)}{a-a \cos ^2(x)} \, dx &=\frac {\int \csc ^3(x) \, dx}{a}\\ &=-\frac {\cot (x) \csc (x)}{2 a}+\frac {\int \csc (x) \, dx}{2 a}\\ &=-\frac {\tanh ^{-1}(\cos (x))}{2 a}-\frac {\cot (x) \csc (x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(51\) vs. \(2(22)=44\).
time = 0.01, size = 51, normalized size = 2.32 \begin {gather*} \frac {-\frac {1}{8} \csc ^2\left (\frac {x}{2}\right )-\frac {1}{2} \log \left (\cos \left (\frac {x}{2}\right )\right )+\frac {1}{2} \log \left (\sin \left (\frac {x}{2}\right )\right )+\frac {1}{8} \sec ^2\left (\frac {x}{2}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 36, normalized size = 1.64
method | result | size |
default | \(\frac {\frac {1}{4 \cos \left (x \right )+4}-\frac {\ln \left (\cos \left (x \right )+1\right )}{4}+\frac {1}{-4+4 \cos \left (x \right )}+\frac {\ln \left (-1+\cos \left (x \right )\right )}{4}}{a}\) | \(36\) |
norman | \(\frac {-\frac {1}{8 a}+\frac {\tan ^{4}\left (\frac {x}{2}\right )}{8 a}}{\tan \left (\frac {x}{2}\right )^{2}}+\frac {\ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a}\) | \(36\) |
risch | \(\frac {{\mathrm e}^{3 i x}+{\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2} a}-\frac {\ln \left ({\mathrm e}^{i x}+1\right )}{2 a}+\frac {\ln \left ({\mathrm e}^{i x}-1\right )}{2 a}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 37 vs.
\(2 (18) = 36\).
time = 0.27, size = 37, normalized size = 1.68 \begin {gather*} \frac {\cos \left (x\right )}{2 \, {\left (a \cos \left (x\right )^{2} - a\right )}} - \frac {\log \left (\cos \left (x\right ) + 1\right )}{4 \, a} + \frac {\log \left (\cos \left (x\right ) - 1\right )}{4 \, a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 48 vs.
\(2 (18) = 36\).
time = 0.38, size = 48, normalized size = 2.18 \begin {gather*} -\frac {{\left (\cos \left (x\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - {\left (\cos \left (x\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 2 \, \cos \left (x\right )}{4 \, {\left (a \cos \left (x\right )^{2} - a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {\csc {\left (x \right )}}{\cos ^{2}{\left (x \right )} - 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 38 vs.
\(2 (18) = 36\).
time = 0.41, size = 38, normalized size = 1.73 \begin {gather*} -\frac {\log \left (\cos \left (x\right ) + 1\right )}{4 \, a} + \frac {\log \left (-\cos \left (x\right ) + 1\right )}{4 \, a} + \frac {\cos \left (x\right )}{2 \, {\left (\cos \left (x\right )^{2} - 1\right )} a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 26, normalized size = 1.18 \begin {gather*} -\frac {\cos \left (x\right )}{2\,\left (a-a\,{\cos \left (x\right )}^2\right )}-\frac {\mathrm {atanh}\left (\cos \left (x\right )\right )}{2\,a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________